home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
c
/
cenvid9.zip
/
SCRANDOM.BAT
< prev
next >
Wrap
DOS Batch File
|
1994-03-04
|
801b
|
29 lines
@echo OFF
REM *******************************************************************
REM *** SCRANDOM.BAT - Demonstrate SCREEN.LIB by putting characters ***
REM *** ver.1 randomly all over the screen ***
REM *******************************************************************
CEnvi %0.bat
GOTO CENVI_EXIT
#include "Screen.lib"
// Get Screen Height and Width
ScrHeight = ScreenSize().row;
ScrWidth = ScreenSize().col;
// Initialize a random random number generator
srand();
// Until key is hit, write random square, random color, random location
while ( !kbhit() ) {
ScrWrite( '█',rand() % ScrHeight,rand() % ScrWidth,rand() % 0x10,BLACK );
}
// flush the keyboard
while( kbhit() ) getch();
ScreenCursor(ScrWidth-1,ScrHeight-1);
:CENVI_EXIT